#include "stdafx.h"
#include <boost/test/auto_unit_test.hpp>
#include <sstream>
#include "detail/bmock_out_arg_val.hpp"
#include "detail/bmock_out_ptr_arg_val.hpp"
#include "detail/bmock_test_control_tools.hpp"

namespace bmock {
	struct stam_out_arg_val : public out_arg_val {
		stam_out_arg_val(const char *const n)
			:out_arg_val(n)

		{}
		~stam_out_arg_val() {}
		std::string _get_out_value()
		{
			return get_out_value();
		}

		bool null_supplied() const {
			return false;
		}
		bool update_out_value(const arg_checker &,const std::string &) const {
			return false;
		}
		stam_out_arg_val &operator =(const stam_out_arg_val &) {
			return *this;
		}
	};


	BOOST_AUTO_TEST_CASE(test_out_arg_val_get_out_value) {
		const char m[4]="bla";
		stam_out_arg_val p_val(m);
		std::string v(p_val._get_out_value());

		BOOST_CHECK_EQUAL(v,"\?\?\?");
	}

	BOOST_AUTO_TEST_CASE(test_out_arg_val_for_coverage)
	{
		const control_tools_ptr t(new bmock::test_control_tools);
		arg_checker l(t);
		const char m[4]="bla";
		stam_out_arg_val p_val(m);
		stam_out_arg_val p_val_(m);
		BOOST_CHECK_EQUAL(false,p_val.null_supplied());
		BOOST_CHECK_EQUAL(false,p_val.update_out_value(l,""));
		BOOST_CHECK_NO_THROW(p_val_=p_val);
	}
}
